function renderGood(good, dataGood2category, dataCategory)
{
	var itemResult = good["name"] + ":";

	var dataGood2cat = dataGood2category[good["mc.id"]];
	var dataGood2catLen = dataGood2cat.length;
	for(var a = 0;a < dataGood2catLen;a++)
		itemResult += dataCategory[dataGood2cat[a]] + ",";

	Output(itemResult + "\r\n");
}

function createGroup(data,getKeyFunc,getValueFunc)
{
	var result = [];
	for(var a = 0;a < data.length;a++)
	{
		var srcItem = data[a];
		var groupValue = getKeyFunc(srcItem);
		var value = getValueFunc(srcItem);

		var destItem = result[groupValue];
		if(destItem == null)
		{
			destItem = [];
			result[groupValue] = destItem;
		}
		destItem.push(value);
	}
	return result;
}

function createIndex(data,getIndexFunc,getValueFunc)
{
	var result = [];
	for(var a = 0;a < data.length;a++)
	{
		var srcItem = data[a];
		var groupValue = getIndexFunc(srcItem);
		var value = getValueFunc(srcItem);
		result[groupValue] = value;
	}
	return result;
}

	var data = DataLoader.getData();
	var dataGood = data[0];
	//var dataGood2category = createGroup(data[1],function(item) { return item["id_good"]; },function(item) { return item["id_category"]; });
	//var dataCategory = createIndex(data[2],function(item) { return item["mc.id"]; },function(item) { return item["name"]; });
	var dataGood2category = DataLoader.createGroup(data[1],function(item) { return item["id_good"]; },function(item) { return item["id_category"]; });
	var dataCategory = DataLoader.createIndex(data[2],function(item) { return item["mc.id"]; },function(item) { return item["name"]; });

	for(var a = 0;a < dataGood.length;a++)
	{
		renderGood(dataGood[a],dataGood2category,dataCategory);
		if(a > 15)
			break;
	}